function y = dqdrtic(x)
%  DQDRTIC  Function   
%x0=[3,3,3...,3]..  
%fmin=n/2,m=20
%Author:shi yangyang
n=length(x);
y=ones(1,n-2);
c=100;
d=100;
for i=1:n-2
    y(i)=(x(i)^2+c*x(i+1)^2+d*x(i+2)^2);
end
y=sum(y);